home *** CD-ROM | disk | FTP | other *** search
/ Mac-Source 1994 July / Mac-Source_July_1994.iso / C and C++ / Libraries / MIDI Manager Class Library / CMIDIClient.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-12-14  |  1.5 KB  |  48 lines  |  [TEXT/KAHL]

  1. /*
  2.  *--- CMIDIClient.h ----------------------------------------------------------
  3.  * Copyright © Paul Ferguson, 1990, 1991, 1992.  All rights reserved.
  4.  *
  5.  * For use with THINK C 5.0 and the THINK Class Library.
  6.  *
  7.  * Description:
  8.  *    This class defines a MIDI Manager client object.  Every application that
  9.  *    creates CMIDI objects must first create a CMIDIClient object, gMIDIClient
  10.  *    (defined in CMIDIClient.c).  You should not create any additional
  11.  *    CMIDIClient objects.
  12.  *
  13.  *    Refer to the CMIDI Programmer's Manual for a complete desciption of
  14.  *    this class.
  15.  *----------------------------------------------------------------------------
  16.  */
  17. #pragma once
  18. #include <CObject.h>
  19. #include <MIDI.h>                // ••• !!! DANGER, WILL ROBINSON !!! •••
  20.                                 // You must use 2.0 version of MIDI.h, not the
  21.                                 // one included with THINK C 5.0 (ver 1.2).
  22.                                 // Otherwise, you will get compile and link errors.
  23.  
  24. #define ErrNoMIDI    -249        // MIDI MANAGER DRIVER NOT PRESENT. (It happens more
  25.                                 // often than you think…)  Minus 249 is one more than
  26.                                 // the first real MIDI Manager error code, and does
  27.                                 // not appear to be used presently.
  28.  
  29.  
  30. class CMIDIClient : public CObject
  31. {
  32.  
  33. public:
  34.  
  35.     OSErr            IMIDIClient(short theIconID);
  36.     virtual    void    Dispose(void);
  37.     MIDIIDListHdl    GetPorts(void);
  38.     Boolean            WorldChanged(void);
  39.     unsigned long    GetVerNum(void);
  40.     unsigned short    GetShortVerNum(void);
  41.  
  42. private:
  43.  
  44.     unsigned long    midiMgrVerNum;        // Version number.  Also used to
  45.                                         // determine whether signed in (if non-zero)
  46. };
  47.  
  48. // end of CMIDIClient.h